package de.tabuma.pm.gadget.controller;

import de.tabuma.lib.tabumacontroller;
import de.tabuma.pm.*;
import de.tabuma.pm.gadget.logik.*;
import de.tabuma.pm.gadget.entity.*;
import java.io.PrintWriter;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;

/**
 *
 * @author alefen
 */
public class list extends tabumacontroller {
    public list(String servlet, Hashtable hashtable) {
        super(servlet, hashtable);
    }

    @Override
    public void navigate(ServletContext context, HttpServletRequest request, HttpServletResponse response, PrintWriter out) {
        request.setAttribute(constants.gadgetActionId, "0");
        String projectId = request.getParameter(constants.projectId);
        int projectIdInt = Integer.valueOf(projectId);
        List<Gadget> gList = GadgetFacade.getList(projectIdInt);
        request.setAttribute(constants.gadgetList, gList);
    }
}